// 正则-replace方法使用

#include <regex>
#include <iostream>
#include "time.h"

int main(void)
{
    std::string fullpath = "c://a/b/x/c/xx13.db";
    std::string pattern = "/\\w+\\.db";
    std::regex re(pattern);
    std::string fmt = "";
    std::string fullpath_dir = regex_replace(fullpath, re, fmt);

    std::cout << "fullpath_dir: " << fullpath_dir.c_str() << std::endl;
    printf("---------------end-----------------\n");
    return 0;
}